package com.bckj.fastboot.core.extra.dbsearch.dbmodel;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

@Data
public class DbModelInfo {

    private Map<String, String> fieldToColumnMapping;

    public DbModelInfo(int size) {
        fieldToColumnMapping = new HashMap<>(size);
    }

    public void fieldToColumn(String field, String column) {
        fieldToColumnMapping.put(field, column);
    }

    public String getColumn(String field) {
        return fieldToColumnMapping.get(field);
    }
}
